package com.app.PhanQuyen;

import java.io.Serializable;

import org.zoolu.sip.message.BaseMessage;

import android.app.Activity;

import com.app.Network.NetworkLayer;

import it.unipr.ce.dsg.s2p.message.BasicMessage;
import it.unipr.ce.dsg.s2p.message.Payload;
import it.unipr.ce.dsg.s2p.org.json.JSONObject;
import it.unipr.ce.dsg.s2p.sip.Address;


public  class Quyen implements Serializable {

	protected Boolean read;
	protected Boolean write;
	protected Boolean send;
	protected Boolean receive;
	protected String ID;
	protected String name;
	//protected NetworkLayer network;
	
	/***
	 * Hàm khởi tạo
	 * @param read Có quyền read
	 * @param write Có quy�?n read
	 * @param send Có quy�?n read
	 * @param receive Có quy�?n read
	 */
	
	public Quyen(Boolean read, Boolean write, Boolean send, Boolean receive){
		this.read=read;
		this.write=write;
		this.send=send;
		this.receive=receive;
	}
	public Quyen(Boolean read, Boolean write, Boolean send, Boolean receive,String ID, String name){
		this.read=read;
		this.write=write;
		this.send=send;
		this.receive=receive;
		this.ID=ID;
		this.name=name;
	}
	public Quyen(){
		
	}

	@Override
	public String toString(){
		String s=name+":"+ ID;
		s+=" read: "+this.read;
		s+=" write: "+this.write;
		s+=" send: "+this.send;
		s+=" receive: "+this.receive;
		return s;
	}
	

//	 public void Send(BasicMessage message, Address toAddress);
//	 public  void Recieve(JSONObject peerMsg, Address sender, Activity activity);
//	
//	 public void Read();
//	 public void Write() ;


	public Boolean getRead() {
		return read;
	}

	public void setRead(Boolean read) {
		this.read = read;
	}

	public Boolean getWrite() {
		return write;
	}

	public void setWrite(Boolean write) {
		this.write = write;
	}

	public Boolean getSend() {
		return send;
	}

	public void setSend(Boolean send) {
		this.send = send;
	}

	public Boolean getReceive() {
		return receive;
	}

	public void setReceive(Boolean receive) {
		this.receive = receive;
	}

	public String getID() {
		return ID;
	}

	public void setID(String iD) {
		ID = iD;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}


	
}
